<template>
    <div class="unselectable">
        <router-view v-slot="{Component}">
            <keep-alive>
                <component :is="Component" v-if="$route.meta.keepAlive"  :key="$route.name"/>
            </keep-alive>
            <component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.name"/>
        </router-view>
    </div>
</template>
<script lang='ts' setup>
import { onMounted } from "vue"
import { setTheme } from "/@/styles/theme" 
import { BuryinigPointStrore } from '/@/stores/buryingPointStore'
onMounted(() => {
    let url = new URL(window.location.href)
    let search = new URLSearchParams(url.search)
    let theme = search.get('theme') || localStorage.getItem('theme')
    if(theme) {   
        localStorage.setItem('theme', theme as any)
        setTheme(theme)
    }
})
const myStoreBP = BuryinigPointStrore()
</script>

<style>
@import "/@/assets/css/vant/vantButton.less";
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    height: 100vh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  html ::-webkit-scrollbar,
  body ::-webkit-scrollbar{
    /* display: none; */
  }
  .van-toast {
    z-index: 9999 !important; /* 提高 z-index */
    }
  .particulars-detail-popup {
    background: rgba(0, 0, 0, 0.7) !important;
  }
  .unselectable {
        -webkit-user-select: none;
        /* Safari */
        -moz-user-select: none;
        /* Firefox */
        -ms-user-select: none;
        /* IE 10 and IE 11 */
        user-select: none;
        /* Standard syntax */
    }
</style>